//获取Token参数
	var Request = new Object();
	Request = GetRequest();
	var token= Request['Token'];
	var TreeCode = '' ;
	var rowindex="" ;
	var recordid="" ;
	$('.mb').hide();
	$('.datagrid-sort-icon').hide();	
	var downURL ="";
	var upURL="";
$(document).ready(function(){
	var grid=$('#grid').datagrid({
		width:'auto',
		height:'auto',
		fit:true,
		nowrap: false,
		striped: true,
		collapsible : false,
		singleSelect:true,
		url:'action/basic/Depart/list.json?Token=' + token,
			sortName: 'F_CODE',
			sortOrder: 'asc',
			remoteSort: false,
			loadMsg:'正在载入数据...',
			idField:'F_ID',
			columns:[[
			          {field:'F_CODE',title:"<div class='tCol' style='display: block;padding:0px;width:100%; text-align:center;' ><span style='float: right;width: 100%;'>编码</span></div>",width:120,sortable:true,align:'left'},
			          {field:'F_NAME',title:"<div class='tCol' style='display: block;padding:0px;width:100%; text-align:center;' ><span style='float: right;width: 100%;'>名称</span></div>",width:120,sortable:true,align:'left'},
			          {field:'F_MNEM',title:"<div class='tCol' style='display: block;padding:0px;width:100%; text-align:center;' ><span style='float: right;width: 100%;'>助记符</span></div>",width:120,sortable:true,align:'left'},			          
			          {field:'F_TYPE',title:'类型',width:80,sortable:true,align:'center'},
			          {field:'F_LINKMAN',title:"<div class='tCol' style='display: block;padding:0px;width:100%; text-align:center;' ><span style='float: right;width: 100%;'>联系人</span></div>",width:120,sortable:true,align:'left'},
			          {field:'F_PHONE',title:"<div class='tCol' style='display: block;padding:0px;width:100%; text-align:center;' ><span style='float: right;width: 100%;'>电话</span></div>",width:120,sortable:true,align:'left'},
                      {field:'F_ADDR',title:"<div class='tCol' style='display: block;padding:0px;width:100%; text-align:center;' ><span style='float: right;width: 100%;'>地址</span></div>",width:150,sortable:true,align:'left'},
			          {field:'F_PURCNO',title:"<div class='tCol' style='display: block;padding:0px;width:100%; text-align:center;' ><span style='float: right;width: 100%;'>准购证证号</span></div>",width:140,sortable:true,align:'left'},
			          {field:'F_PURCDATE',title:"<div class='tCol' style='display: block;padding:0px;width:100%; text-align:center;' ><span style='float: right;width: 100%;'>办证日期</span></div>",width:120,sortable:true,align:'left'},
//			          {field:'F_GVNDEPTID',title:'财政部门',width:120,sortable:true,align:'left'},	
			          {field:'F_UNITYCODE',title:"<div class='tCol' style='display: block;padding:0px;width:100%; text-align:center;' ><span style='float: right;width: 100%;'>统一编码</span></div>",width:130,sortable:true,align:'left'},
			          {field:'F_BANK',title:"<div class='tCol' style='display: block;padding:0px;width:100%; text-align:center;' ><span style='float: right;width: 100%;'>开户银行</span></div>",width:120,sortable:true,align:'left'},
			          {field:'F_ACCOUNT',title:"<div class='tCol' style='display: block;padding:0px;width:100%; text-align:center;' ><span style='float: right;width: 100%;'>银行账号</span></div>",width:120,sortable:true,align:'left'},
			          {field:'F_NTCODE',title:"<div class='tCol' style='display: block;padding:0px;width:100%; text-align:center;' ><span style='float: right;width: 100%;'>执收单位编码</span></div>",width:140,sortable:true,align:'left'},
			          {field:'F_NTNAME',title:"<div class='tCol' style='display: block;padding:0px;width:100%; text-align:center;' ><span style='float: right;width: 100%;'>执收单位名称</span></div>",width:150,sortable:true,align:'left'},
			          {field:'F_MEMO',title:"<div class='tCol' style='display: block;padding:0px;width:100%; text-align:center;' ><span style='float: right;width: 100%;'>备注</span></div>",width:120,sortable:true,align:'left'},
			          {field:'F_STATE',title:'状态',width:80,sortable:true,align:'center',
			        	  formatter:function(value,rec){
			        	  var str="启用";
			        	  if (value=="1")
			        		  str="停用";
			        	  return str;
			          }
			          }
			        ]],
		pagination:true,
		rownumbers:false,
		onBeforeLoad:function(param){
			$('.mb').hide();
			$('.datagrid-sort-icon').hide();	
			
			$('div.datagrid-view2>div.datagrid-body').css('overflow','hidden');
			$('div.datagrid-view2>div.datagrid-header').attr('id','gheader');
			$('#gheader').css('height','35px');
			$('#gheader>div.datagrid-header-inner').attr('id','gInner');
			$('#gInner>table').attr('id','gTable');
			$('#gTable').css('height','35px');
			$('#gTable').find('td').css('height','30px');
			$('#gTable').find('td').css('line-height','30px');
			
									},
		onLoadSuccess:function(){
			// 默认选中第一行
			if($(this).datagrid("getRows").length > 0){
//				$(this).datagrid("selectRow", 0);
			}
			$('div.datagrid-view2>div.datagrid-body').css('overflow','hidden');		
			
			$('div.datagrid-view2>div.datagrid-body').css('overflow','hidden');
			$('div.datagrid-view2>div.datagrid-header').attr('id','gheader');
			$('#gheader').css('height','35px');
			$('#gheader>div.datagrid-header-inner').attr('id','gInner');
			$('#gInner>table').attr('id','gTable');
			$('#gTable').css('height','35px');
			$('#gTable').find('td').css('height','30px');
			$('#gTable').find('td').css('line-height','30px');
			
		},onDblClickRow:function(rowIndex,rowData){
			update();
//			SelGirdRow(recordid);	
	    },onClickRow:function(rowIndex,rowData)
	    {
	    	var id = rowData.F_ID ;
	    	SelTree(id);
	    }
	});
	
	//表单提交Action
	downURL = $("#ExportS").attr("href") ;
	upURL = $('#uploadForm').attr("Action") ;
	//初始化表单Action
	$('#uploadForm').attr("Action",upURL+"&tableName=ARP_BSC_DEPT");
	$("#ExportS").attr("href",downURL+"&tableName=ARP_BSC_DEPT") ;	
	
	//使用单位树
	$('#DepartTree').tree({
		url :'action/basic/depart/tree.json?Token=' + token+"&rnd="+Math.random(),
		        onDblClick: function(node)
				{
					//双击展开节点
					//$('#DepartTree').tree('expand', node.target)
					
					$('#DepartTree').tree("reload",node.target) ;
					
				},
				onClick: function(node)
				{
					//双击展开节点
					queryList();
					$('#grid').datagrid('clearSelections');
					if(node)
					{
					    SelGirdRow(node.id);
					}
						
                },
                onLoadSuccess: function(node,data)
                {  
                	var rootnode = $(this).tree('getRoot');
                	$('#DepartTree').tree('expand',rootnode.target);
                	$('#DeptTree').css('overflow','hidden');               	
                }
//                ,onShowPanel:function()
//        		{
//        			$(this).combotree('panel').parent('.panel').css('border-bottom','#87cedb 3px solid');
//        			$(this).combotree('panel').parent('.panel').css('border-left','#87cedb 3px solid');
//        			$(this).combotree('panel').parent('.panel').css('border-right','#87cedb 3px solid');
//        		}
         });	
	
     $.getJSON("action/basic/depart/getUser.json?Token=" + token+"&rnd="+Math.random(), function(data){
        if(data.USERTYPE!="A")
    	{
        	$("#btnExport").attr("style","display:none;")    	
    	}
    });
	// 单位类型---查询
	$("#qryTYPE").combobox({
	    url:'action/basic/depart/initDeptTypeForQry.json?Token=' +token+"&rnd="+Math.random(),
	    valueField:'id',
	    textField:'text',
	    panelHeight:55,
	    editable:false
	});
	// 单位类型---修改
	$("#editTYPE").combobox({
	    url:'action/basic/depart/initDeptType.json?Token=' +token+"&rnd="+Math.random(),
	    valueField:'id',
	    textField:'text',
	    editable:false,	
	    panelHeight:45
	});
	// 单位类型---新增
	$("#addTYPE").combobox({
	    url:'action/basic/depart/initDeptType.json?Token=' +token+"&rnd="+Math.random(),
	    valueField:'id',
	    textField:'text',
	    editable:false,	
	    panelHeight:45
	});
	$('#addForm input').focusout(trimkeyup);
	$('#updateForm input').focusout(trimkeyup);
	$('#queryForm input').focusout(trimkeyup);
	$("#editNAME").change(zjm);
	$("#addNAME").change(zjm);
	$('#addCODE').keydown(onlyNum);
	$('#editCODE').keydown(onlyNum);
	
	$('div.datagrid-view2>div.datagrid-body').css('overflow','hidden');
	$('div.datagrid-view2>div.datagrid-header').attr('id','gheader');
	$('#gheader').css('height','35px');
	$('#gheader>div.datagrid-header-inner').attr('id','gInner');
	$('#gInner>table').attr('id','gTable');
	$('#gTable').css('height','35px');
	$('#gTable').find('td').css('height','30px');
	$('#gTable').find('td').css('line-height','30px');

});
	
function trimkeyup(e) {
    lucene_objInput = $(this);
    if (e.keyCode != 38 && e.keyCode != 40 && e.keyCode != 13) {
        var im = $.trim(lucene_objInput.val());
        lucene_objInput.val(im); 
    }
}  
function selChange()
{
	var Str = $("#selType").val() ;
	$('#uploadForm').attr("Action",upURL+"&tableName="+Str);
	$("#ExportS").attr("href",downURL+"&tableName="+Str) ;
}

function loop(node){

	var nodes = $('#DepartTree').tree('getChildren',node.target);
	$('#DepartTree').tree('expand',nodes.target);
	$('#DepartTree').tree('collapse',nodes.target);
    for(var i = 0;i<nodes.length;i++){
        loop(nodes[i]);
    }
    
} 

//编码禁止输入数字以外字符
function onlyNum(e) 
{ 
	lucene_objInput = $(this);
	var im = $.trim(lucene_objInput.val());
	
	//第一个if定义除数字外可响应的键,如46对应Delete键,若要响应Tab键,可在后面加上&&!(event.keyCode==9),若要允许输入小数点,则可加上&&!(event.keyCode==190)&&!(event.keyCode==110),其它类似 
	if(!(e.keyCode==46)&&!(e.keyCode==8)&&!(e.keyCode==37)&&!(e.keyCode==39)) 
	{
	//第二个if定义要响应的数字键,||前面的是响应左边键盘对应的数字,后面是响应小键盘上的数字 
	    if(!((e.keyCode>=48&&e.keyCode<=57)||(e.keyCode>=96&&e.keyCode<=105))) 
	    {
	    	return false;
	    }
	}		    	 
} 

function formSubmit()
{
	//判断输入文件不能为空
	var str = document.getElementById('__file').value;
	if(str==""){
		alert("请选择文件后再点击导入！");
		return false;
	}
	if($("#uploadForm").form('validate'))
	{
			$('#uploadForm').form('submit',{
		    	onSubmit:function(){ 
				},
		       	 success:function(data){
					if(data!="")
					{
						//导入成功，返回信息
						var msg = (new Function( "return " + data))();				
						if(msg!=""&&msg!=null)
						  alert(msg.msg);
						//重写文件输入框
						$('#fileSpan').html('');style="height:25px; width:400px; float:left;"
		    		    $('#fileSpan').html("<input type=\"file\"  name=\"__file\" id=\"__file\"  contentEditable=\"false\" style=\"height:25px; width:400px; float:left;\" />");
					}
		         }
			});
	}
}

function downLoad()
{
	var Actionurl = "action/basic/excels/download.file?Token="+token ;
	$("#ExportS").attr("href",Actionurl);
	location.reload() ;
	
}
//助记码生成
function zjm(e) {
    lucene_objInput = $(this);
    var str = $.trim(lucene_objInput.val());
    if(str.toString().length>0)
    {
    	var zjmstr=makePy(str);
    	var strtemp = zjmstr[0];
    	$("#updateForm input[name=F_MNEM]").val(strtemp);
    	$("#addForm input[name=F_MNEM]").val(strtemp);
    }	
    else
    {
	    if (e.keyCode != 38 && e.keyCode != 40 && e.keyCode != 13) {
	        var im = $.trim(lucene_objInput.val());
	        lucene_objInput.val(im); 
	    }
    }    
}  
function  SelTree(ID)
{
	var node = $('#DepartTree').tree('find',ID);
	if(node)
	{
		$('#DepartTree').tree('expandTo',node.target);	
		$('#DepartTree').tree('select',node.target);
	}	
}
function loopTree(node){

	var node = $('#DepartTree').tree('getChildren',node.target);
	if(node)
	{
		$('#DepartTree').tree('expand',node.target);
		loopTree(nodes);
	}
	   
} 
function SelGirdRow(ID)
{
	$('#grid').datagrid("selectRecord",ID);
}

function showScroll(){
	$('div.datagrid-view2>div.datagrid-body').css('overflow','auto');
}

function hideScroll(e,o){
	if(o.contains(event.toElement ) == false) 
		$('div.datagrid-view2>div.datagrid-body').css('overflow','hidden');
	
}
function TreeshowScroll(){
	$('#DeptTree').css('overflow','auto');	
}

function TreehideScroll(e,o){
	if(o.contains(event.toElement ) == false) 
		$('#DeptTree').css('overflow','hidden');		
}

//刷新
function Reload(){
	var node = $('#DepartTree').tree("getSelected");
	if(node.text=="所有")
	{
		GetTree();
	}else{
		$('#DepartTree').tree("reload",node.target) ;	
	}	
	$('#grid').datagrid("reload");
//	$('#grid').datagrid("options").pageNumber = 1;
//	$('#grid').datagrid(
//	{
//		url : 'action/basic/Depart/qrylist.json?Token='+ token,
//		'queryParams' : {
//		    'isQuery':"Y",
//		    'F_CODE':"",					
//			'rnd' : Math
//					.random()
//	}
//	});
//	GetTree();
}
function change()
{
	update();
	SelGirdRow(recordid);	
}
//修改
function update(){
	$("#updateForm").attr("action","action/basic/Depart/edit.json?Token=" + token);
	var select = $('#grid').datagrid('getSelected');
	var code = select.F_CODE ;
	var ID = "" ;
	var name = "" ;
	$.getJSON("action/basic/Depart/getInfoByCode?Token=" + token+"&rnd="+Math.random()+"&F_CODE="+code, function(data){
            ID = data.F_ID ;
    });
    if(select){
    	
    	$("#updateForm input[name=F_ID]").val(select.F_ID);
    	rowindex = $('#grid').datagrid('getRowIndex',select);
    	recordid=select.F_ID;
    	$("#updateForm input[name=F_CODE]").val(select.F_CODE);
    	$("#updateForm input[name=F_NAME]").val(select.F_NAME);
    	$("#updateForm input[name=F_MNEM]").val(select.F_MNEM);
    	$("#updateForm input[name=F_UNITYCODE]").val(select.F_UNITYCODE);
    	$("#editTYPE").combobox('setValue',select.F_TYPE);
    	$("#updateForm input[name=F_LINKMAN]").val(select.F_LINKMAN);
    	$("#editPHONE").numberbox('setValue',select.F_PHONE);
    	$("#updateForm input[name=F_ADDR]").val(select.F_ADDR);
    	$("#updateForm input[name=F_PURCNO]").val(select.F_PURCNO);
    	$("#editPURCDATE").numberbox('setValue',select.F_PURCDATE);
    	$("#updateForm input[name=F_BANK]").val(select.F_BANK);
    	$("#updateForm input[name=F_ACCOUNT]").val(select.F_ACCOUNT);    	
    	$("#updateForm input[name=F_NTCODE]").val(select.F_NTCODE);
    	$("#updateForm input[name=F_NTNAME]").val(select.F_NTNAME);   
    	$("#updateForm input[name=F_MEMO]").val(select.F_MEMO);   
    	openDialog('修改','updateDig','grid','updateForm',{'height':435,'width':600,'RowID':select.F_ID,clearForm:false},function(){   
    		SelTree(recordid);
			var oldNode = $('#DepartTree').tree('find',select.F_ID) ; 
			if(oldNode)
			{
				 		
	    		$.getJSON("action/basic/Depart/getParentID.json?Token=" + token+"&rnd="+Math.random()+"&F_CODE="+code, function(data){
		            if(data.F_ID=="999"||data.F_ID=="")
					{	
						var node = $('#DepartTree').tree('getRoot');
					}
					else
					{
						var node = $('#DepartTree').tree('find',data.F_ID);	
					}   
		            if(node)
		            {
		            	if(node.text!="所有")
	            		{
		            		var parnode = $('#DepartTree').tree('getParent',oldNode.target) ;
		            		if(parnode)
	            			{
		            			$('#DepartTree').tree('remove',oldNode.target) ;
			            		$('#DepartTree').tree('append',{   
				                parent: node.target,   
				                data:[{   
				                	id : data.F_CHILD,
				                    text:"["+code+"]"+name,   
				                    checked:true  
				                }]   
					            });	
			            		$('#DepartTree').tree('reload',node.target);
		            		}else
	            			{
		            			$('#DepartTree').tree('reload');
	            			}
		            		
		            	}else
		            	{$('#DepartTree').tree('reload');}
		            	
		            }else
		            	{$('#DepartTree').tree('reload');}
					
	            });  
			}

    		///////////////////////////////////
//    		var node = $('#DepartTree').tree('find',select.F_ID) ;    		
//    		var parnode = $('#DepartTree').tree('getParent',node.target) ;
//    		var root = $('#DepartTree').tree('getRoot') ;
//    		if(parnode.id==root.id)
//			{
//    			$('#DepartTree').tree('reload') ;
//			}else{
//				$('#DepartTree').tree('reload',parnode.target) ;	
//				$('#DepartTree').tree('reload',node.target) ;
//			}
    		////////////////////////////////////////////
	    		},function(){},
	    		function(){
	    			code=$("#updateForm input[name=F_CODE]").val();
	    			name=$("#updateForm input[name=F_NAME]").val();
	    			});    	
   	}else{
    	parent.$.messager.alert('消息','<h5>请选择一行数据</h5>','warning');
   	}
    
}
//刷新树
function GetTree()
{
	$('#DepartTree').tree({
			url :'action/basic/depart/tree.json?Token=' + token+"&rnd="+Math.random(),
			    onDblClick: function(node)
				{
					//双击展开节点
					$('#DepartTree').tree('toggle', node.target) ;					
					$('#DepartTree').tree("reload",node.target) ;
					
				},
				onClick: function(node)
				{
					//双击展开节点
					queryList();
					$('#grid').datagrid('clearSelections');
					if(node)
					{
					    SelGirdRow(node.id);
					}
						
                },
                onLoadSuccess: function(node,data)
                {  
                	var rootnode = $(this).tree('getRoot');
                	$('#DepartTree').tree('expand',rootnode.target);
                	$('#DeptTree').css('overflow','hidden');               	
                }
//                ,onShowPanel:function()
//        		{
//        			$(this).combotree('panel').parent('.panel').css('border-bottom','#87cedb 3px solid');
//        			$(this).combotree('panel').parent('.panel').css('border-left','#87cedb 3px solid');
//        			$(this).combotree('panel').parent('.panel').css('border-right','#87cedb 3px solid');
//        		}
	         });
}

function uploadFile()
{
	var tableName = "ARP_BSC_DEPT" ;
	$("#upLoadForm").attr("action","action/basic/excels/uploadFile.file?Token=" + token+"&tableName="+tableName);

		openDialog('导入','upLoadDig','grid','upLoadForm',{'height': 435,'width':580,clearForm:true},
			function(){ 
				$("#upLoadDig").dialog('open'); 

		             },
		function(){parent.$.messager.alert('提示',"<h5>"+data.msg+"!</h5>");},
		function(){formSubmit();});	

}
function formSubmit()
{
	//判断输入文件不能为空
	var str = document.getElementById('__file').value;
	if(str==""){
		alert("请选择文件后再点击导入！");
		return false;
	}
	if($("#uploadForm").form('validate'))
	{
			$('#uploadForm').form('submit',{
		    	onSubmit:function(){ 
				},
		       	 success:function(data){
					if(data!="")
					{
						//导入成功，返回信息
						var msg = (new Function( "return " + data))();				
						if(msg!=""&&msg!=null)
						  alert(msg.msg);
						//重写文件输入框
						$('#fileSpan').html('');style="height:25px; width:400px; float:left;"
		    		    $('#fileSpan').html("<input type=\"file\"  name=\"__file\" id=\"__file\"  contentEditable=\"false\" style=\"height:25px; width:400px; float:left;\" />");
					}
		         }
			});
	}
}

//新增
function add()
{
	$("#addForm").attr("action","action/basic/Depart/add.json?Token=" + token);
	var node = $('#DepartTree').tree("getSelected");
	var deptCode= "" ;
	var name = "";
	if(node!==null)
	{
	    deptCode= node.text;
		if (deptCode!=null&&deptCode.length>0)
		   deptCode=deptCode.substring(1+deptCode.indexOf('[',0),deptCode.indexOf(']',0));
		$.getJSON("action/basic/Depart/getMaxCode.json?Token=" + token+"&rnd="+Math.random()+"&F_CODE="+deptCode, function(data){
	            $("#addForm input[name=F_CODE]").val(data.F_CODE);
	    });
		var code=$("#addForm input[name=F_CODE]").val();
		openDialog('新增','addDig','grid','addForm',{'height': 435,'width':580,clearForm:true},
			function(){ 
				$("#addDig").dialog('open'); 
				$.getJSON("action/basic/Depart/getMaxCode.json?Token=" + token+"&rnd="+Math.random()+"&F_CODE="+deptCode, function(data){
	            $("#addForm input[name=F_CODE]").val(data.F_CODE);
	            });
				$.getJSON("action/basic/Depart/getParentID.json?Token=" + token+"&rnd="+Math.random()+"&F_CODE="+code, function(data){
	            if(data.F_ID=="999"||data.F_ID=="")
				{	
					var node = $('#DepartTree').tree('getRoot');
				}
				else
				{
					var node = $('#DepartTree').tree('find',data.F_ID);	
				}   
	            if(node)
            	{
	 				$('#DepartTree').tree('append',{   
	                parent: node.target,   
	                data:[{   
	                	id : data.F_CHILD,
	                    text:"["+code+"]"+name,   
	                    checked:true  
	                }]   
		            });	
            	}	            

//				if(node.text!="所有")
//					$('#DepartTree').tree('reload',node.target);
            });   

		},
		function(){},
		function(){code=$("#addForm input[name=F_CODE]").val();name=$("#addForm input[name=F_NAME]").val()});	
	}else{
		parent.$.messager.alert('提示',"<h5>请选择一个节点添加!</h5>");
	}
		

}
//查询
function QryConndition()
{
 query(function(){
	 var d=$("#qryTYPE").val();
					$('#grid').datagrid("options").pageNumber=1;
					$('#grid').datagrid({'queryParams':{
						
	    				'F_CODE':$("#queryForm input[name=F_CODE]").val(),
	    				'F_NAME':$("#queryForm input[name=F_NAME]").val(),
	    				'F_TYPE':$("#queryForm input[name=F_TYPE]").val()
					}});
		    		$('#queryDig').dialog('close');	
				},{height:230,width:350},"queryDig","queryForm");
//			   GetTree();
}
//点击树，查询并刷新网格
function queryList() {
	var node = $('#DepartTree').tree("getSelected");
    var deptCode= node.text;
	if (deptCode!=null&&deptCode.length>0)
	   deptCode=deptCode.substring(1+deptCode.indexOf('[',0),deptCode.indexOf(']',0));
	TreeCode = deptCode ;
	$('#grid').datagrid("options").pageNumber = 1;
	$('#grid')
			.datagrid(
					{
						url : 'action/basic/Depart/qrylist.json?Token='+ token,								
						'queryParams' : {
						    'isQuery':"Y",
						    'F_CODE':deptCode,					
							'rnd' : Math
									.random()
						}
					});
	SelGirdRow(node.id);
}
//删除
function deleteOne()
{
   	$("#deleteForm").attr("action","action/basic/Depart/del.json?Token=" + token);
	var select = $('#grid').datagrid('getSelected');
	if(select)
	{
		recordid = select.F_ID ;
		if(select.F_STATE=='0')
		{
		    parent.$.messager.alert('提示!','<h5>当前单位处于启用状态，不能删除!</h5>');
		}
		else
		{
			var msg = "您确定要删除项目【" + select.F_CODE + " " + select.F_NAME + "】吗?";
			$("#deleteForm input[name=F_ID]").val(select.F_ID);
			del("grid","delId","deleteForm","F_ID",msg,function()
			{
				var id=select.F_ID ;
				var node = $('#DepartTree').tree('find',recordid);
				if(node)
				{
					var parent = $('#DepartTree').tree('getParent',node.target);
					$('#DepartTree').tree('remove',node.target);
					if(parent.text!="所有")
						$('#DepartTree').tree('reload',parent.target);
				}	
				
				$('#grid').datagrid('clearSelections');
			});
		}
	}
	else
	{
	    parent.$.messager.show({title:'消息',msg:"<p style='font-family:'宋体',Arial;font-size:14px;'>请选择一条数据!</p>",timeout:3000,showType:'slide',width:250,height:150});
	}
	
}

//设置级长
function setjc()
{
	$("#SetJCForm").attr("action","action/basic/Depart/setJC.json?Token=" + token+"&rnd="+Math.random());
								$.getJSON("action/basic/Depart/getJC.json?Token=" + token+"&rnd="+Math.random(), function(data){
									var StrJC = data.F_ITEM1 ;
//				                    $("#SetJCForm input[name=F_ITEM1]").val(StrJC);
									$("#codeLen").numberbox('setValue',StrJC);
				                });
								openDialog('级长设置','SetJCDig','grid','SetJCForm',{'height': 170,'width':350,clearForm:true},
									function(){ 
										$("#SetJCDig").dialog('close'); 									
			                           });
}

//启用
function DeptEnable()
{
    var select = $('#grid').datagrid('getSelected');
	if(select.F_STATE=="0")
	{
	    msg = "当前单位已处于启用状态,不能重复启用!";
	    SelGirdRow(select.F_ID);
	    parent.$.messager.show({title:'消息',msg:"<p style='font-family:'宋体',Arial;font-size:14px;'>"+msg+"</p>",timeout:3000,showType:'slide',width:250,height:150});
	}
	else
	{
    $.getJSON("action/basic/Depart/editState.json?F_ID="+select.F_ID+"&F_STATE=0&Token=" + token+"&rnd="+Math.random(),
    function(data){
	clearSelect('grid');
	$('#grid').datagrid('reload');
	SelGirdRow(select.F_ID);	
	parent.$.messager.show({title:'消息',msg:"<p style='font-family:'宋体',Arial;font-size:14px;'>"+data.msg+"</p>",timeout:3000,	showType:'slide',width:250,height:150});
    });
	}	
}
//停用
function DeptUnable()
{
    var select = $('#grid').datagrid('getSelected'); 
	if(select.F_STATE=="1")
	{
	    msg = "当前单位已处于停用状态,不能重复停用!";
	    SelGirdRow(select.F_ID);
	    parent.$.messager.show({title:'消息',msg:"<p style='font-family:'宋体',Arial;font-size:14px;'>"+msg+"</p>",timeout:3000,showType:'slide',width:250,height:150});
	}
	else
	{
	$.getJSON("action/basic/Depart/editState.json?F_ID="+select.F_ID+"&F_STATE=1&Token=" + token+"&rnd="+Math.random(),
    function(data){
	clearSelect('grid');
	$('#grid').datagrid('reload');
	SelGirdRow(select.F_ID);
	parent.$.messager.show({title:'消息',msg:"<p style='font-family:'宋体',Arial;font-size:14px;'>"+data.msg+"</p>",timeout:3000,	showType:'slide',width:250,height:150});
	});
	}        
}
function checkdata(values,num)
{
	//判断长度，清空空格
	var temp = $.trim(values);
	if(temp.length<num)
	{
		$(this).attr("value",temp);
		$(this).attr("text",temp);		
	}
	else
	{
		var maxvalue= cutstr(temp,num) ;
		this.value= maxvalue ;
	}
}
function cutstr(str,len)
{
   var str_length = 0;
   var str_len = 0;
   str_cut = new String();
   str_len = str.length;
   for(var i = 0;i<str_len;i++)
   {
      a = str.charAt(i);
      str_length++;
      if(escape(a).length > 4)
      {
         //中文字符的长度经编码之后大于4
         str_length++;
      }
      str_cut = str_cut.concat(a);
      if(str_length>=len)
      {
         str_cut = str_cut.concat("...");
         return str_cut;
      }
   }
    //如果给定字符串小于指定长度，则返回源字符串；
   if(str_length<len)
   {
     return  str;
   }
}

//$.extend($.fn.validatebox.defaults.rules, { 
//    checkEmptyCode:{
//    	validator: function(value, param){
//		    var text =  $.trim(value);
//		    return (text.length>0)
//		},
//		message: '编码不能为空'
//    },
//    checkEmptyName:{
//    	validator: function(value, param){
//		    var text =  $.trim(value);
//		    return (text.length>0)
//		},
//		message: '名称不能为空'
//    },
//    checkEmptyStr:{
//    	validator: function(value, param){
//		    var text =  $.trim(value);
//		    return (text.length>0)
//		},
//		message: '不能为空'
//    },
//    Isnum:{
//    	validator: function(value, param){
//    	var result=true;
//    	    if(!(/^\d+$/.test(value))){
//    	    	$(this).val("");
//    	    	result=false;
//    	    }
//    	    	
//		    return result;
//		},
//		message: '只能输入数字'
//    },
//    Isphone:{
//    	validator: function(value, param){
//        reg=/^(\d{3,4}\-)?[1-9]\d{6,7}$/;    
//        return reg.test(value)
//		},
//		message: '电话号码格式错误'
//    }
//    
//});

///////////////////////////////////////////////助记码/////////////////////////////////////////////////////////////
var strChineseFirstPY = "YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJTMYHZWZHFLZPPQHGSCYYYNJQYXXGJHHSDSJNKKTMOMLCRXYPSNQSECCQZGGLLYJLMYZZSECYKYYHQWJSSGGYXYZYJWWKDJHYCHMYXJTLXJYQBYXZLDWRDJRWYSRLDZJPCBZJJBRCFTLECZSTZFXXZHTRQHYBDLYCZSSYMMRFMYQZPWWJJYFCRWFDFZQPYDDWYXKYJAWJFFXYPSFTZYHHYZYSWCJYXSCLCXXWZZXNBGNNXBXLZSZSBSGPYSYZDHMDZBQBZCWDZZYYTZHBTSYYBZGNTNXQYWQSKBPHHLXGYBFMJEBJHHGQTJCYSXSTKZHLYCKGLYSMZXYALMELDCCXGZYRJXSDLTYZCQKCNNJWHJTZZCQLJSTSTBNXBTYXCEQXGKWJYFLZQLYHYXSPSFXLMPBYSXXXYDJCZYLLLSJXFHJXPJBTFFYABYXBHZZBJYZLWLCZGGBTSSMDTJZXPTHYQTGLJSCQFZKJZJQNLZWLSLHDZBWJNCJZYZSQQYCQYRZCJJWYBRTWPYFTWEXCSKDZCTBZHYZZYYJXZCFFZZMJYXXSDZZOTTBZLQWFCKSZSXFYRLNYJMBDTHJXSQQCCSBXYYTSYFBXDZTGBCNSLCYZZPSAZYZZSCJCSHZQYDXLBPJLLMQXTYDZXSQJTZPXLCGLQTZWJBHCTSYJSFXYEJJTLBGXSXJMYJQQPFZASYJNTYDJXKJCDJSZCBARTDCLYJQMWNQNCLLLKBYBZZSYHQQLTWLCCXTXLLZNTYLNEWYZYXCZXXGRKRMTCNDNJTSYYSSDQDGHSDBJG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JLTKTTYTMXGTCJTZAYYOCZLYLBSZYWJYTSJYHBYSHFJLYGJXXTMZYYLTXXYPZLXYJZYZYYPNHMYMDYYLBLHLSYYQQLLNJJYMSOYQBZGDLYXYLCQYXTSZEGXHZGLHWBLJHEYXTWQMAKBPQCGYSHHEGQCMWYYWLJYJHYYZLLJJYLHZYHMGSLJLJXCJJYCLYCJPCPZJZJMMYLCQLNQLJQJSXYJMLSZLJQLYCMMHCFMMFPQQMFYLQMCFFQMMMMHMZNFHHJGTTHHKHSLNCHHYQDXTMMQDCYZYXYQMYQYLTDCYYYZAZZCYMZYDLZFFFMMYCQZWZZMABTBYZTDMNZZGGDFTYPCGQYTTSSFFWFDTZQSSYSTWXJHXYTSXXYLBYQHWWKXHZXWZNNZZJZJJQJCCCHYYXBZXZCYZTLLCQXYNJYCYYCYNZZQYYYEWYCZDCJYCCHYJLBTZYYCQWMPWPYMLGKDLDLGKQQBGYCHJXY";

//此处收录了375个多音字,数据来自于http://www.51window.net/page/pinyin

var oMultiDiff={"19969":"DZ","19975":"WM","19988":"QJ","20048":"YL","20056":"SC","20060":"NM","20094":"QG","20127":"QJ",
	"20167":"QC","20193":"YG","20250":"KH","20256":"ZC","20282":"SC","20285":"QJG","20291":"TD","20314":"YD","20340":"NE",
	"20375":"TD","20389":"YJ","20391":"CZ","20415":"PB","20446":"YS","20447":"SQ","20504":"TC","20608":"KG","20854":"QJ",
	"20857":"ZC","20911":"PF","20504":"TC","20608":"KG","20854":"QJ","20857":"ZC","20911":"PF","20985":"AW","21032":"PB",
	"21048":"XQ","21049":"SC","21089":"YS","21119":"JC","21242":"SB","21273":"SC","21305":"YP","21306":"QO","21330":"ZC",
	"21333":"SDC","21345":"QK","21378":"CA","21397":"SC","21414":"XS","21442":"SC","21477":"JG","21480":"TD","21484":"ZS",
	"21494":"YX","21505":"YX","21512":"HG","21523":"XH","21537":"PB","21542":"PF","21549":"KH","21571":"E","21574":"DA",
	"21588":"TD","21589":"O","21618":"ZC","21621":"KHA","21632":"ZJ","21654":"KG","21679":"LKG","21683":"KH","21710":"A",
	"21719":"YH","21734":"WOE","21769":"A","21780":"WN","21804":"XH","21834":"A","21899":"ZD","21903":"RN","21908":"WO",
	"21939":"ZC","21956":"SA","21964":"YA","21970":"TD","22003":"A","22031":"JG","22040":"XS","22060":"ZC","22066":"ZC",
	"22079":"MH","22129":"XJ","22179":"XA","22237":"NJ","22244":"TD","22280":"JQ","22300":"YH","22313":"XW","22331":"YQ",
	"22343":"YJ","22351":"PH","22395":"DC","22412":"TD","22484":"PB","22500":"PB","22534":"ZD","22549":"DH","22561":"PB",
	"22612":"TD","22771":"KQ","22831":"HB","22841":"JG","22855":"QJ","22865":"XQ","23013":"ML","23081":"WM","23487":"SX",
	"23558":"QJ","23561":"YW","23586":"YW","23614":"YW","23615":"SN","23631":"PB","23646":"ZS","23663":"ZT","23673":"YG",
	"23762":"TD","23769":"ZS","23780":"QJ","23884":"QK","24055":"XH","24113":"DC","24162":"ZC","24191":"GA","24273":"QJ",
	"24324":"NL","24377":"TD","24378":"QJ","24439":"PF","24554":"ZS","24683":"TD","24694":"WE","24733":"LK","24925":"TN",
	"25094":"ZG","25100":"XQ","25103":"XH","25153":"PB","25170":"PB","25179":"KG","25203":"PB","25240":"ZS","25282":"FB",
	"25303":"NA","25324":"KG","25341":"ZY","25373":"WZ","25375":"XJ","25384":"A","25457":"A","25528":"SD","25530":"SC",
	"25552":"TD","25774":"ZC","25874":"ZC","26044":"YW","26080":"WM","26292":"PB","26333":"PB","26355":"ZY","26366":"CZ",
	"26397":"ZC","26399":"QJ","26415":"ZS","26451":"SB","26526":"ZC","26552":"JG","26561":"TD","26588":"JG","26597":"CZ",
	"26629":"ZS","26638":"YL","26646":"XQ","26653":"KG","26657":"XJ","26727":"HG","26894":"ZC","26937":"ZS","26946":"ZC",
	"26999":"KJ","27099":"KJ","27449":"YQ","27481":"XS","27542":"ZS","27663":"ZS","27748":"TS","27784":"SC","27788":"ZD",
	"27795":"TD","27812":"O","27850":"PB","27852":"MB","27895":"SL","27898":"PL","27973":"QJ","27981":"KH","27986":"HX",
	"27994":"XJ","28044":"YC","28065":"WG","28177":"SM","28267":"QJ","28291":"KH","28337":"ZQ","28463":"TL","28548":"DC",
	"28601":"TD","28689":"PB","28805":"JG","28820":"QG","28846":"PB","28952":"TD","28975":"ZC","29100":"A","29325":"QJ",
	"29575":"SL","29602":"FB","30010":"TD","30044":"CX","30058":"PF","30091":"YSP","30111":"YN","30229":"XJ","30427":"SC",
	"30465":"SX","30631":"YQ","30655":"QJ","30684":"QJG","30707":"SD","30729":"XH","30796":"LG","30917":"PB","31074":"NM",
	"31085":"JZ","31109":"SC","31181":"ZC","31192":"MLB","31293":"JQ","31400":"YX","31584":"YJ","31896":"ZN","31909":"ZY",
	"31995":"XJ","32321":"PF","32327":"ZY","32418":"HG","32420":"XQ","32421":"HG","32438":"LG","32473":"GJ","32488":"TD",
	"32521":"QJ","32527":"PB","32562":"ZSQ","32564":"JZ","32735":"ZD","32793":"PB","33071":"PF","33098":"XL","33100":"YA",
	"33152":"PB","33261":"CX","33324":"BP","33333":"TD","33406":"YA","33426":"WM","33432":"PB","33445":"JG","33486":"ZN",
	"33493":"TS","33507":"QJ","33540":"QJ","33544":"ZC","33564":"XQ","33617":"YT","33632":"QJ","33636":"XH","33637":"YX",
	"33694":"WG","33705":"PF","33728":"YW","33882":"SR","34067":"WM","34074":"YW","34121":"QJ","34255":"ZC","34259":"XL",
	"34425":"JH","34430":"XH","34485":"KH","34503":"YS","34532":"HG","34552":"XS","34558":"YE","34593":"ZL","34660":"YQ",
	"34892":"XH","34928":"SC","34999":"QJ","35048":"PB","35059":"SC","35098":"ZC","35203":"TQ","35265":"JX","35299":"JX",
	"35782":"SZ","35828":"YS","35830":"E","35843":"TD","35895":"YG","35977":"MH","36158":"JG","36228":"QJ","36426":"XQ",
	"36466":"DC","36710":"JC","36711":"ZYG","36767":"PB","36866":"SK","36951":"YW","37034":"YX","37063":"XH","37218":"ZC",
	"37325":"ZC","38063":"PB","38079":"TD","38085":"QY","38107":"DC","38116":"TD","38123":"YD","38224":"HG","38241":"XTC",
	"38271":"ZC","38415":"YE","38426":"KH","38461":"YD","38463":"AE","38466":"PB","38477":"XJ","38518":"YT","38551":"WK",
	"38585":"ZC","38704":"XS","38739":"LJ","38761":"GJ","38808":"SQ","39048":"JG","39049":"XJ","39052":"HG","39076":"CZ",
	"39271":"XT","39534":"TD","39552":"TD","39584":"PB","39647":"SB","39730":"LG","39748":"TPB","40109":"ZQ","40479":"ND",
	"40516":"HG","40536":"HG","40583":"QJ","40765":"YQ","40784":"QJ","40840":"YK","40863":"QJG"};

//参数,中文字符串

//返回值:拼音首字母串数组

function makePy(str){
	if(typeof(str) != "string")
		throw new Error(-1,"函数makePy需要字符串类型参数!");
	
	var arrResult = new Array(); //保存中间结果的数组
	for(var i=0,len=str.length;i<len;i++)
	{		
		var ch = str.charAt(i);//获得unicode码		
		arrResult.push(checkCh(ch));//检查该unicode码是否在处理范围之内,在则返回该码对映汉字的拼音首字母,不在则调用其它函数处理
	}	
	return mkRslt(arrResult);//处理arrResult,返回所有可能的拼音首字母串数组
}

function checkCh(ch)
{
	var uni = ch.charCodeAt(0);	
	if(uni > 40869 || uni < 19968)//如果不在汉字处理范围之内,返回原字符,也可以调用自己的处理函数
	{
		 ch= ch.toUpperCase();
		 return ch;
	}
	 //dealWithOthers(ch);//检查是否是多音字,是按多音字处理,不是就直接在strChineseFirstPY字符串中找对应的首字母	
	return (oMultiDiff[uni]?oMultiDiff[uni]:(strChineseFirstPY.charAt(uni-19968)));
}

function mkRslt(arr){
	var arrRslt = [""];
	for(var i=0,len=arr.length;i<len;i++){
	var str = arr[i];
	var strlen = str.length;
	if(strlen == 1)
	{
		for(var k=0;k<arrRslt.length;k++)
		{
			arrRslt[k] += str;
		}
	}
	else{
			var tmpArr = arrRslt.slice(0);
			arrRslt = [];
			for(k=0;k<strlen;k++)
			{				
				var tmp = tmpArr.slice(0);//复制一个相同的arrRslt				
				for(var j=0;j<tmp.length;j++)//把当前字符str[k]添加到每个元素末尾
				{
					tmp[j] += str.charAt(k);
				}					
				arrRslt = arrRslt.concat(tmp);//把复制并修改后的数组连接到arrRslt上
			}
		}	
	}	
	return arrRslt;
}

//两端去空格函数
String.prototype.trim = function() {    return this.replace(/(^\s*)|(\s*$)/g,""); }